<%--
  Created by IntelliJ IDEA.
  User: TianyuChen
  Date: 2020/3/3
  Time: 11:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
  <head>
    <title>page</title>
  </head>
  <body>
    <b>分页查询数据</b>
    <br />
    <table border="1">
      <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>密码</th>
        <th>性别</th>
        <th>年龄</th>
        <th>生日</th>
      </tr>

      <c:forEach items="${pageInfo.pageList}" var="pi">
        <tr>
          <td>${pi.uid}</td>
          <td>${pi.uname}</td>
          <td>${pi.pwd}</td>
          <td>${pi.sex==1?'男':'女'}</td>
          <td>${pi.age}</td>
          <td>${pi.birth}</td>
        </tr>
      </c:forEach>
    </table>
    <a href="/page/user?pageNum=${pageInfo.pageNum-1}&pageSize=${pageInfo.pageSize}" <c:if test="${pageInfo.pageNum<=1}">onclick="javascript:return false;" </c:if>>上一页</a>
    <a href="/page/user?pageNum=${pageInfo.pageNum+1}&pageSize=${pageInfo.pageSize}" <c:if test="${pageInfo.pageNum>=pageInfo.pageTotal}">onclick="javascript:return false;" </c:if>>下一页</a>
  </body>
</html>
